1. Field of the Invention
Embodiments of the present invention relate generally to compressed data operations during graphics processing and more specifically to a system and method for avoiding read-modify-write performance penalties during compressed data operations.
2. Description of the Related Art
In graphics processing, compressed data is often employed for efficient memory usage. For example, the frame buffer of a graphics processing unit (“GPU”) typically stores graphics data in compressed form to realize storage efficiencies. The unit of memory for data stored in the frame buffer is called a “tile” or a “compression tile.” Compression tiles may store color data or depth data for a fixed number of pixels in compressed or uncompressed form.
FIG. 1 illustrates a GPU 102 including a pair of rendering pipelines. The first rendering pipeline is a depth raster operations pipeline (“ZROP”) 106 and the second rendering pipeline is a color raster operations pipeline (“CROP”) 108. CROP 108 is configured to handle data transfer operations from both pipelines to a frame buffer 110, which is normally implemented as a DRAM. The frame buffer 110 receives the data in blocks from CROP 108 and stores it in the form of tiles.
In some GPU architectures, the size of the blocks transferred by CROP 108 is smaller than the tile size. In these architectures, storing a block in the frame buffer 110 involves identifying a tile that corresponds to the block and updating that tile to include data from the block, while leaving all remaining data in the tile unchanged. For an uncompressed tile, modifying the tile in-memory can be done because the uncompressed format of the tile allows modifying a portion of the tile without disturbing the contents of the remainder of the tile. However, as is commonly known, modifying compressed tiles in-memory is very difficult because the dependent relationship among data stored in compressed format causes changes to one portion of the tile to disturb the remainder of the tile. Thus, for a compressed tile, updating the tile involves reading the contents of the tile from memory in the frame buffer 110, decompressing the tile contents within the frame buffer, modifying the uncompressed tile contents with the block of data to be written, compressing the modified tile, and storing the compressed, modified tile to memory in the frame buffer 110. This process is computationally very expensive because modern DRAMs are not able to change from read to write mode quickly and because the operation causes the frame buffer 110 to de-pipeline, i.e., stop streaming accesses.